# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=masscan
pkgver=1.3.2
pkgrel=1
pkgdesc="TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes"
url="https://github.com/robertdavidgraham/masscan"
arch="all"
license="AGPL-3.0-only"
makedepends="libpcap-dev linux-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/robertdavidgraham/masscan/archive/$pkgver.tar.gz"

build() {
	make CC="${CC:-gcc}" CFLAGS="$CFLAGS -I."
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 doc/masscan.8 -t "$pkgdir/usr/share/man/man8"
}

sha512sums="b0709f6f937a0e86c6913407c3bc60187074395ffff7a7a2bb54b23824d72982510e44fb1b1e7dcba85c4ad25ab1a623597661db43d9046165ba865cd9bd5b27  masscan-1.3.2.tar.gz"
